<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta content="phalconplus API doc" name="description">
    <title>
                    phalconplus API Documentation
            </title>
    <link rel="stylesheet" type="text/css" href="../../../asset/static/prettify.css" />

<script src="../../../asset/static/prettify.js"></script>
<script src="../../../asset/api_definition.js"></script>


                        <link rel="stylesheet" type="text/css" href="../../../asset/static/prettify.css" />
                    <link rel="stylesheet" type="text/css" href="../../../asset/static/zephir-theme.css" />
            
    

                        <script src="../../../asset/static/prettify.js"></script>
                                    <script src="../../../asset/api_definition.js"></script>
                    <script src="../../../asset/static/jquery.min.js"></script>
                    <script src="../../../asset/static/zephir-doc.js"></script>
                <script type="application/javascript">let ZepCurrentPath = '../../../'</script>
    </head>
 <body onload="prettyPrint()">
        <div id="top-bar">
            <div id="top-left">
                                    phalconplus Documentation <span class="version">v1.1.0</span>
                            </div>
            <div id="top-right">
            </div>
        </div>
        <div id="body">
            <div id="body-left">
                <div class="header-search">
                    <input class="search-box" placeholder="Search for a class or namespace " type="text" />
                    <div id="menu-wrapper">
                    </div>
                </div>
            </div>
            <div id="body-right">
                <div class="content">
                    
<div class="breadcrumb">
    
    <ul>
        
        <li><a href="../../../index.html">Home</a></li>
        
                <li><a href="../../../classes.html">Classes</a></li>
                <li><a >PhalconPlus\Curl\Curl</a></li>
                
    </ul>
    
</div>
<div class="class-header clearfix">

    <div class="access-buttons">
        <a class="zep-button" href="../../../source/PhalconPlus/Curl/Curl.html">Source</a>
            </div>
    
    <div class="class-full-name">
        <span class="class-type">Class</span>
        
                <span class="namespace-piece">
            <a href="../../../namespace/PhalconPlus.html">
                PhalconPlus            </a>
        </span>
                <span class="namespace-piece">
            <a href="../../../namespace/PhalconPlus/Curl.html">
                Curl            </a>
        </span>
        
        <h1 class="class-name">Curl</h1>
    </div>
</div>


<div class="hidden-anchor"  id="methods"></div>
<div class="methods-summary standard-bandeau">Methods</div>

<ul class="method-summary-list">
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-getAllowedMethods">getAllowedMethods</a><!--
            --></span><!--
            -->()<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Get allowed methods.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-setDefaultHeaders">setDefaultHeaders</a><!--
            --></span><!--
            -->(<span class="param-data-type">array</span> <span class="variable param-name">$headers</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Set the default headers for every request.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-getDefaultHeaders">getDefaultHeaders</a><!--
            --></span><!--
            -->()<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Get the default headers.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-setDefaultOptions">setDefaultOptions</a><!--
            --></span><!--
            -->(<span class="param-data-type">array</span> <span class="variable param-name">$options</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Set the default curl options for every request.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-getDefaultOptions">getDefaultOptions</a><!--
            --></span><!--
            -->()<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Get the default options.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-buildUrl">buildUrl</a><!--
            --></span><!--
            -->(<span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">array</span> <span class="variable param-name">$query</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Build an URL with an optional query string.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-newRequest">newRequest</a><!--
            --></span><!--
            -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$data</span>, <span class="param-data-type">int</span> <span class="variable param-name">$encoding</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Create a new response object and set its values.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-newJsonRequest">newJsonRequest</a><!--
            --></span><!--
            -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">array</span> <span class="variable param-name">$data</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Create a new JSON request and set its values.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-newRawRequest">newRawRequest</a><!--
            --></span><!--
            -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$data</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Create a new raw request and set its values.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-prepareRequest">prepareRequest</a><!--
            --></span><!--
            -->(<span class="param-data-type">variable</span> <span class="variable param-name">$request</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Prepare the curl resource for sending a request.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-sendRequest">sendRequest</a><!--
            --></span><!--
            -->(<span class="param-data-type">variable</span> <span class="variable param-name">$request</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Send a request.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-createResponseObject">createResponseObject</a><!--
            --></span><!--
            -->(<span class="param-data-type">variable</span> <span class="variable param-name">$response</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Extract the response info, header and body from a cURL response. Saves                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-__call">__call</a><!--
            --></span><!--
            -->(<span class="param-data-type">string</span> <span class="variable param-name">$func</span>, <span class="param-data-type">array</span> <span class="variable param-name">$args</span>)<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Handle dynamic calls to the class.                </div>
            </div>
            </div>
</li>
            
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <!-- method-summary -->
            <!-- Do not remove comments below. It's a trick to remove the spaces. -->
            <span class="method-name">
                <a href="#method-details-zephir_init_properties_PhalconPlus_Curl_Curl">zephir_init_properties_PhalconPlus_Curl_Curl</a><!--
            --></span><!--
            -->()<!--
            --><span class="method-return">
                <strong>:</strong>
                                    void
                            </span>
        </div>
            </div>
</li>
    </ul>

<div class="hidden-anchor" id="methods-details"></div>
<div class="methods-summary standard-bandeau">Methods Details</div>

<ul class="method-details-list">
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getAllowedMethods"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">getAllowedMethods</span><!--
                -->()
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Get allowed methods.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-setDefaultHeaders"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">setDefaultHeaders</span><!--
                -->(<span class="param-data-type">array</span> <span class="variable param-name">$headers</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Set the default headers for every request.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getDefaultHeaders"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">getDefaultHeaders</span><!--
                -->()
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Get the default headers.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-setDefaultOptions"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">setDefaultOptions</span><!--
                -->(<span class="param-data-type">array</span> <span class="variable param-name">$options</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Set the default curl options for every request.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getDefaultOptions"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">getDefaultOptions</span><!--
                -->()
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Get the default options.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-buildUrl"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">buildUrl</span><!--
                -->(<span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">array</span> <span class="variable param-name">$query</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Build an URL with an optional query string.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-newRequest"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">newRequest</span><!--
                -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$data</span>, <span class="param-data-type">int</span> <span class="variable param-name">$encoding</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Create a new response object and set its values.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-newJsonRequest"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">newJsonRequest</span><!--
                -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">array</span> <span class="variable param-name">$data</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Create a new JSON request and set its values.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-newRawRequest"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">newRawRequest</span><!--
                -->(<span class="param-data-type">string</span> <span class="variable param-name">$method</span>, <span class="param-data-type">string</span> <span class="variable param-name">$url</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$data</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Create a new raw request and set its values.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-prepareRequest"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">prepareRequest</span><!--
                -->(<span class="param-data-type">variable</span> <span class="variable param-name">$request</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Prepare the curl resource for sending a request.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-sendRequest"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">sendRequest</span><!--
                -->(<span class="param-data-type">variable</span> <span class="variable param-name">$request</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Send a request.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-createResponseObject"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-protected keyword">protected</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">createResponseObject</span><!--
                -->(<span class="param-data-type">variable</span> <span class="variable param-name">$response</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Extract the response info, header and body from a cURL response. Saves                    </div>
                    <div class="description">
                        the data in variables stored on the object.                    </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-__call"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">__call</span><!--
                -->(<span class="param-data-type">string</span> <span class="variable param-name">$func</span>, <span class="param-data-type">array</span> <span class="variable param-name">$args</span>)
            </p>

            <div class="method-doc">
                                                    <div class="summary">
                        Handle dynamic calls to the class.                    </div>
                    <div class="description">
                                            </div>
                            </div>

        </div>
    </div>
</li>
            
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-zephir_init_properties_PhalconPlus_Curl_Curl"></div>
    <div class="method-details">
        <div class="method-details-details">

            <p class="method-signature">
                                    <span class="visibility-internal keyword">internal</span>
                                <span class="keyword">function</span>
                <!-- method-details -->
                <!-- Do not remove comments below. It's a trick to remove the spaces. -->
                <span class="method-name">zephir_init_properties_PhalconPlus_Curl_Curl</span><!--
                -->()
            </p>

            <div class="method-doc">
                                            </div>

        </div>
    </div>
</li>
    </ul>
                </div>
            </div>
        </div>
    </body>
</html>
